package controller;

import jackson.test.po.Customer;
import jackson.test.po.Order;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class JacksonController {
	@RequestMapping("test1")
	@ResponseBody
	public Customer test1(){
		Customer c = new Customer();
		Order o = new Order();
		c.setId(1);
		c.setCname("john");
		o.setId(10);
		c.getOrders().add(o);
		o.setCustomer(c);
		return c;
		
	}
}
